package anything;
/*
 * CreateBlankDocument.java
 *
 * Created on 26 ตุลาคม 2550, 19:36 น.
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

import org.w3c.dom.*;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
/**
 *
 * @author User
 */
public class CreateBlankDocument {
  
  /** Creates a new instance of CreateBlankDocument */
  public static void main(String[] args) {
    System.out.println("Creating Blank Document...");
    
    try {
      //Create instance of DocumentBuilderFactory
      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
      //Get the DocumentBuilder
      DocumentBuilder parser =  factory.newDocumentBuilder();
      //Create blank DOM Document
      Document doc = parser.newDocument();
      System.out.println(doc);
    }
    catch(Exception e) {
      System.out.println(e.getMessage());
    }
    
    System.out.println("Done...");
    System.out.println("Exiting...");
  }
  
}
